/*
 * Copyright (c) 2023, 2023,yzc.cn All rights reserved.
 *
 */
package com.crmapi.service.impl;

import com.crmapi.mapper.ApprovalMapper;
import com.crmapi.pojo.Approval;
import com.crmapi.pojo.PageBean;
import com.crmapi.service.ApprovalService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>Project: CRMSystem - ApprovalServiceImpl</p>
 * <p>Powered by yzc On 2023-12-05 11:31:21</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@Service
public class ApprovalServiceImpl implements ApprovalService {

    @Autowired
    ApprovalMapper approvalMapper;
    //查询审核表
    @Override
    public PageBean queryList(Integer page, Integer pageSize, String code, String applicant, Integer type, String apptime, Integer status) {
        PageHelper.startPage(page,pageSize);
        List<Approval> approvalList =  approvalMapper.queryList(code, applicant, type, apptime, status);
        PageInfo pageInfo = new PageInfo<>(approvalList);
        return new PageBean(pageInfo.getTotal(),approvalList);
    }
}
